package com.panshi.modules.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panshi.modules.domain.UserCollect;
import com.panshi.modules.mapper.UserCollectMapper;
import com.panshi.modules.service.UserCollectService;
import com.panshi.vo.ItemQueryUserVo;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserCollectServiceImpl extends ServiceImpl<UserCollectMapper, UserCollect> implements UserCollectService {
    //查询个人收藏列表
    @Override
    public List<UserCollect> findUserCollectList(ItemQueryUserVo itemQueryVo) {
        return this.baseMapper.findUserCollectList(itemQueryVo);
    }

    //删除个人收藏列表的指定收藏信息
    @Override
    public int deleteUserCollect(Long id) {
        return this.baseMapper.deleteById(id);
    }

    //统计个人收藏总数
    public int selectCollectCount(Long id){
        return this.baseMapper.selectCollectCount(id);
    }


}
